# $Id: Makefile.zlib_cf.lib.unix 677587 2024-01-18 20:07:53Z ivanov $
-ifneq "" "$(findstring --arm,$(signature))$(findstring --aarch64,$(signature))"
+ifneq "" "$(findstring --arm64,$(signature))$(findstring --aarch64,$(signature))"
crc32.o: CFLAGS += -march=armv8-a+crc
deflate.o: CFLAGS += -march=armv8-a+crc
endif
/* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */
#define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0))
-#ifdef __aarch64__
-
-#include <arm_neon.h>
-#include <arm_acle.h>
-static uint32_t hash_func(deflate_state *s, void* str) {
- return __crc32cw(0, *(uint32_t*)str) & s->hash_mask;
-}
-
-#elif defined __x86_64__ || defined _M_AMD64
-
-#include <immintrin.h>
+#include <simde/x86/sse4.2.h>
static uint32_t hash_func(deflate_state *s, void* str) {
- return _mm_crc32_u32(0, *(uint32_t*)str) & s->hash_mask;
+ return simde_mm_crc32_u32(0, *(uint32_t*)str) & s->hash_mask;
}
-#else
-
-#error "Only 64-bit Intel and ARM architectures are supported"
-
-#endif
-
/* ===========================================================================
* Insert string str in the dictionary and return the previous head
* of the hash chain (the most recent string with same hash key).